From 61f6c3ed721017e28ed2e80e1ebebf5d8fc0c3d5 Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Sat, 9 Mar 2024 21:59:43 +0000 Subject: [PATCH] ; * which-key.el (which-key--truncate-description): Untabify. --- which-key.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/which-key.el b/which-key.el index 985c419f73b..54ec92d2311 100644 --- a/which-key.el +++ b/which-key.el @@ -1701,20 +1701,20 @@ If KEY contains any \"special keys\" defined in (defsubst which-key--truncate-description (desc avl-width) "Truncate DESC description to `which-key-max-description-length'." (let* ((max which-key-max-description-length) - (max (cl-etypecase max - (null nil) - (integer max) - (float (truncate (* max avl-width))) - (function (let ((val (funcall max avl-width))) - (if (floatp val) (truncate val) val)))))) + (max (cl-etypecase max + (null nil) + (integer max) + (float (truncate (* max avl-width))) + (function (let ((val (funcall max avl-width))) + (if (floatp val) (truncate val) val)))))) (if (and max (> (length desc) max)) (let ((dots (and (not (equal which-key-ellipsis "")) - (which-key--propertize - which-key-ellipsis 'face - (get-text-property (1- (length desc)) 'face desc))))) - (if dots + (which-key--propertize + which-key-ellipsis 'face + (get-text-property (1- (length desc)) 'face desc))))) + (if dots (concat (substring desc 0 (- max (length dots))) dots) - (substring desc 0 max))) + (substring desc 0 max))) desc))) (defun which-key--highlight-face (description) -- 2.30.2